package rkdwogus7.practice;

public class DObject {
	public DObject next;
	
	public DObject () { next = null; }
	public void draw() {
		System.out.println( "DObject draw" );
	}

	public static void main(String[] args) {
		DObject start, n, obj;
		
		start = new Line();
		n = start;
		obj = new Rect();
		n.next = obj;
		n = obj;
		obj = new Line();
		n.next = obj;
		n = obj;
		obj = new Circle();
		n.next = obj;
		
//		start.draw();
//		start = start.next;
//		start.draw();
		
		while(start != null) {
			start.draw();
			start = start.next;
		}
	}

	

}
